<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html lang="ko">
<head>
	<%@ include file="/include/header.jsp" %>
	<link rel="stylesheet" href="<%=cp %>/mobile/skin/board/notice/style.css">
	<%@ include file="/include/commonRes.jsp" %>
</head>
<body>
	<%@include file="/include/mainMenuHeader.jsp" %>
	<div id="wrapper">
    	<div id="container">
			<script src="<%=cp%>/js/viewimageresize.js"></script>
			
			<div id="bo_v_table">공지 사항</div>
			
			<article id="bo_v" style="width:100%">
			    <header>
			        <h1 id="bo_v_title">병원관련 | 테스트 글 올립니다</h1>
			    </header>
			
			    <section id="bo_v_info">
			        <h2>페이지 정보</h2>
	        		작성자
	        		<strong>
	        			<span class="sv_member">
	        				최고관리자
	        			</span>
	        		</strong>
		        	<span class="sound_only">작성일</span>
		        	<strong>2015-01-15 14:01</strong>
		        	&nbsp;조회수 : 
		        	<strong>5</strong>
			    </section>
			
			    <section id="bo_v_atc">
			        <h2 id="bo_v_atc_title">본문</h2>
			        <div id="bo_v_img"></div>
			        <div id="bo_v_con">테스트 글 입니다</div>
		                <div id="bo_v_act"></div>
                </section>
			
			    <div id="bo_v_bot">
			        <!-- 링크 버튼 -->
                    <ul class="bo_v_nb">
                        <li><a href="./board.php?bo_table=notice&amp;wr_id=11" class="btn_b01">다음글</a></li>        
                    </ul>
			        
			        <ul class="bo_v_com">
			            <li>
			            	<a href="./write.php?w=u&amp;bo_table=notice&amp;wr_id=13&amp;page=" class="btn_b01">수정</a>
		            	</li>            
		            	<li>
		            		<a href="./delete.php?bo_table=notice&amp;wr_id=13&amp;token=142309654554d2bae1934ab&amp;page=" class="btn_b01" onclick="del(this.href); return false;">
		            			삭제
		            		</a>
		            	</li>                        
		            	<li><a href="./board.php?bo_table=notice&amp;page=" class="btn_b01">목록</a></li>
			            <li>
			            	<a href="./write.php?bo_table=notice" class="btn_b02">글쓰기</a>
			            </li>        
			        </ul>
		    	</div>
			</article>
			
			<script>
			
			function board_move(href)
			{
			    window.open(href, "boardmove", "left=50, top=50, width=500, height=550, scrollbars=1");
			}
			</script>
			
			<!-- 게시글 보기 끝 -->
			
			<script>
			$(function() {
			    $("a.view_image").click(function() {
			        window.open(this.href, "large_image", "location=yes,links=no,toolbar=no,top=10,left=10,width=10,height=10,resizable=yes,scrollbars=no,status=no");
			        return false;
			    });
			
			    // 추천, 비추천
			    $("#good_button, #nogood_button").click(function() {
			        var $tx;
			        if(this.id == "good_button")
			            $tx = $("#bo_v_act_good");
			        else
			            $tx = $("#bo_v_act_nogood");
			
			        excute_good(this.href, $(this), $tx);
			        return false;
			    });
			
			    // 이미지 리사이즈
			    $("#bo_v_atc").viewimageresize();
			});
			
			function excute_good(href, $el, $tx)
			{
			    $.post(
			        href,
			        { js: "on" },
			        function(data) {
			            if(data.error) {
			                alert(data.error);
			                return false;
			            }
			
			            if(data.count) {
			                $el.find("strong").text(number_format(String(data.count)));
			                if($tx.attr("id").search("nogood") > -1) {
			                    $tx.text("이 글을 비추천하셨습니다.");
			                    $tx.fadeIn(200).delay(2500).fadeOut(200);
			                } else {
			                    $tx.text("이 글을 추천하셨습니다.");
			                    $tx.fadeIn(200).delay(2500).fadeOut(200);
			                }
			            }
			        }, "json"
			    );
			}
			</script>    
			

		</div>
	</div>
	<%@ include file="/include/footer.jsp" %>
</body>
</html>